package com.foreveross.util.cfg.defaults;

import com.foreveross.util.cfg.ConfigContainer;
import com.foreveross.util.cfg.ConfigLocalLoader;
import com.foreveross.util.cfg.PropertiesConfigLocalLoader;

public class DefaultPropertiesLoader extends PropertiesConfigLocalLoader
		implements ConfigLocalLoader {

	public final static String CONFIG_FILE = "props/config.properties";

	public String getFileName() {
		return CONFIG_FILE;
	}

	/**
	 * 版本号
	 */
	public static final String CRAWL_VERSION = "system.version";
	/**
	 * 服务名称
	 */
	public static final String CRAWL_SERVER_NAME = "system.servername";

	/**
	 * 天巡 热池最少数
	 */
	public static final String REDIS_TIANXUN_HOT_POOL_MIN = "redis.tianxun.hot.pool.min";

	/**
	 * 天巡 热池最大数
	 */
	public static final String REDIS_TIANXUN_HOT_POOL_MAX = "redis.tianxun.hot.pool.max";
	/**
	 * 启动作业间隔时间
	 */
	public static final String TIMER_TIANXUN_CHECKIP_TIME = "timer.tianxun.checkip.time";
	
	/**
	 * 启动作业开始时间
	 */
	public static final String TIMER_TIANXUN_CHECKIP_START_TIME = "timer.tianxun.checkip.start.time";

	
	public static final String TIANXUN_TEST_THREAD_PROCESS = "tianxun.test.process.thread.num";
	
	
	public static String getVersion() {
		return ConfigContainer.getInstance().get(CRAWL_VERSION, CONFIG_FILE);
	}

	public static String getServerName() {
		return ConfigContainer.getInstance()
				.get(CRAWL_SERVER_NAME, CONFIG_FILE);
	}

	public static String getReidsTianxunPoolMin() {
		return ConfigContainer.getInstance().get(REDIS_TIANXUN_HOT_POOL_MIN,
				CONFIG_FILE);
	}

	public static String getReidsTianxunPoolMax() {
		return ConfigContainer.getInstance().get(REDIS_TIANXUN_HOT_POOL_MIN,
				CONFIG_FILE);
	}

	public static String getTimerTianxunCheckIpTime() {
		return ConfigContainer.getInstance().get(TIMER_TIANXUN_CHECKIP_TIME,
				CONFIG_FILE);
	}
	
	public static String getTimerTianxunCheckIpStartTime() {
		return ConfigContainer.getInstance().get(TIMER_TIANXUN_CHECKIP_START_TIME,
				CONFIG_FILE);
	}
	
	
	public static String getTianxunTestProcessThread(){
		return ConfigContainer.getInstance().get(TIANXUN_TEST_THREAD_PROCESS, CONFIG_FILE);
		
	}	
	public static void main(String[] args){
		
	}
	

}
